import React from 'react';
import { connect } from 'react-redux'
import {withRouter } from 'react-router-dom'
@withRouter
@connect(
    state => state,
)
export default class WxBind extends React.Component {
    constructor(){
        super();
        
    }
    componentWillReceiveProps(nextProps){
          if(nextProps.userLogin.bindState){
              console.log('绑定成功============')
          }
    }
   

    componentDidMount(){
        let WxLogin1 = window.WxLogin1;
        let wx = new WxLogin1(
        {
            id:"wxlogins",
            appid:'wxe95248d3c4243896',
            scope:'snsapi_login',
            redirect_uri:'http://www2.yihangotms.com/otms2/#/menuList/wxBind'
        }
        )
    }
    render() {
        return (
           
            <div id="wxlogins" style={{width:'100%',margin:'0 auto',textAlign:'center'}}>
             </div>
        );
    }
}